package org.hy.persistence.global;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.hy.domain.global.Notification;

public interface NotificationMapper {
	
	Notification findNotificationById(Integer id);
	
	List<Notification> findNotificationsByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("size")int size);
	
	List<Notification> findNotificationsUnReadByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("size")int size);
	
	List<Notification> findNotificationsByUidAndType(@Param("uid") int uid,@Param("type") int type,@Param("offset")int offset,@Param("size")int size);
	
	int insertNotification(Notification notification);
	
	int updateNotification(Notification notification);
	
	int deleteNotification(Integer id);
	
	int countNotification(int uid);
	
	int countNotificationUnRead(int uid);
}
